package com.lei2j.state;

/**
 * Created by lei2j on 2019/2/4.
 */
public class NoQuarterState implements State {

    GumballaMachine gumballaMachine;

    public NoQuarterState(GumballaMachine gumballaMachine) {
        this.gumballaMachine = gumballaMachine;
    }

    @Override
    public void insertQuarter() {
        System.out.println("投币了");
        gumballaMachine.setState(gumballaMachine.getHasQuarterState());
    }
}
